cmake_minimum_required(VERSION 2.8)
set(MODULE_NAME "example")

# 设置指定C++编译器版本。
# include(CheckCXXCompilerFlag)
# CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
# CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
# if(COMPILER_SUPPORTS_CXX11)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # set C++ 11
# elseif(COMPILER_SUPPORTS_CXX0X)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
# message( STATUS "The comipler ${CMAKE_CXX_COMIPLER} has no C++ 11 suport. Please use a different C++ comipler.")
# endif()

# add_executable(AIPlus ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ${all_source})

add_executable(AIPlus ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ${mnn_source} ${lpr_mnn_source} ${lpr_ncnn_source} ${lpr_source} ${parking_source} ${bytetracker_source} ${all_source})

target_link_libraries(AIPlus
    SQLiteCpp
    sqlite3
    securec
    freetype
    -Wl,--whole-archive ${OpenCV_LIBS} -Wl,--no-whole-archive
    -Wl,-z,relro,-z,noexecstack,--disable-new-dtags,-rpath,/lib/=/usr/app/container/3rdApp/AIPlus/lib/
    pthread
    ncnn
    MNN
    dl
    rt) 

# add_executable(yolov3 ${CMAKE_CURRENT_SOURCE_DIR}/yolov3_demo.cpp ${all_source})

# target_link_libraries(yolov3
#     securec  
#     -Wl,--whole-archive ${OpenCV_LIBS} -Wl,--no-whole-archive
#     pthread
#     dl
#     rt) 

# add_executable(yolov5 ${CMAKE_CURRENT_SOURCE_DIR}/yolov5_demo.cpp  ${lpr_source} ${parking_source} ${bytetracker_source} ${all_source})

# target_link_libraries(yolov5
#     SQLiteCpp
#     sqlite3
#     securec
#     freetype  
#     -Wl,--whole-archive ${OpenCV_LIBS} -Wl,--no-whole-archive
#     pthread
#     dl
#     rt) 
